package com.hmall.common.client;

import com.hmall.common.pojo.Address;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;

/**
 * TODO
 *
 * @Author mr.ma
 * @Date 2024/11/22 14:48
 */

@FeignClient("userservice")
public interface AddressClient {

    @GetMapping("{id}")
    public Address findAddressById(@PathVariable("id") Long id);

    @GetMapping("/uid/{userId}")
    public List<Address> findAddressByUserId(@PathVariable("userId") Long userId);

}
